﻿using UnityEngine;
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;

public class Satellite : IBuildable, IDispatchable, IRepeatable
{
	private bool m_Repeat;												// for IRepeatable
	private Kingdom m_Belong;											// for IDispatchable
	private GameEnums.TechName[] m_MotherTech;		// for IDispatchable
	private string m_DisplayName;									// for IBuildable
	private double m_BuildCost;										// for IBuildable
	private double m_OwnCost;											// for Ibuildable


	#region IRepeatable
	public bool Repeat
	{
		get { return m_Repeat; }
		set { m_Repeat = value; }
	}
	#endregion

	#region IDispatchable
	public Kingdom Belong
	{
		get { return m_Belong; }
		set { m_Belong = value; }
	}

	public GameEnums.TechName[] MotherTech
	{
		get { return m_MotherTech; }
		set { m_MotherTech = value; }
	}
	#endregion

	#region IBuildable
	public string DisplayName
	{
		get { return m_DisplayName; }
		set { m_DisplayName = value; }
	}

	public double BuildCost
	{
		get { return m_BuildCost; }
		set { m_BuildCost = value; }
	}

	public double OwnCost
	{
		get { return m_OwnCost; }
		set { m_OwnCost = value; }
	}
	#endregion


	// constructors
	public Satellite()
	{
		m_DisplayName = Utility.SplitName(GameEnums.Dispatchable.Satellite.ToString());

		m_MotherTech = new GameEnums.TechName[] { GameEnums.TechName.OuterSpaceSatellites };
		m_BuildCost = 200.0;
		m_OwnCost = 0.0;
	}

	public Satellite(Kingdom kd) : this()
	{
		m_Belong = kd;
	}


	// for IRepeatable
	public bool CheckRepeat()
	{

		return true;
	}

	public bool CheckRepeat(Planet pl)
	{


		return this.CheckRepeat();
	}
}